package it.virtuscarroccio.com.dao.impl;

import it.virtuscarroccio.com.dao.PersonHasRoleSocietyDAO;
import it.virtuscarroccio.com.model.PersonHasRoleSociety;
import it.virtuscarroccio.com.model.PersonHasRoleSocietyExample;
import it.virtuscarroccio.com.model.PersonHasRoleSocietyKey;
import java.util.List;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class PersonHasRoleSocietyDAOImpl extends SqlMapClientDaoSupport implements PersonHasRoleSocietyDAO {

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public PersonHasRoleSocietyDAOImpl() {
        super();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public int countByExample(PersonHasRoleSocietyExample example) {
        Integer count = (Integer)  getSqlMapClientTemplate().queryForObject("person_has_role_society.ibatorgenerated_countByExample", example);
        return count.intValue();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public int deleteByExample(PersonHasRoleSocietyExample example) {
        int rows = getSqlMapClientTemplate().delete("person_has_role_society.ibatorgenerated_deleteByExample", example);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public int deleteByPrimaryKey(PersonHasRoleSocietyKey key) {
        int rows = getSqlMapClientTemplate().delete("person_has_role_society.ibatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public void insert(PersonHasRoleSociety record) {
        getSqlMapClientTemplate().insert("person_has_role_society.ibatorgenerated_insert", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public void insertSelective(PersonHasRoleSociety record) {
        getSqlMapClientTemplate().insert("person_has_role_society.ibatorgenerated_insertSelective", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public List selectByExample(PersonHasRoleSocietyExample example) {
        List list = getSqlMapClientTemplate().queryForList("person_has_role_society.ibatorgenerated_selectByExample", example);
        return list;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public PersonHasRoleSociety selectByPrimaryKey(PersonHasRoleSocietyKey key) {
        PersonHasRoleSociety record = (PersonHasRoleSociety) getSqlMapClientTemplate().queryForObject("person_has_role_society.ibatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public int updateByExampleSelective(PersonHasRoleSociety record, PersonHasRoleSocietyExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("person_has_role_society.ibatorgenerated_updateByExampleSelective", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public int updateByExample(PersonHasRoleSociety record, PersonHasRoleSocietyExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("person_has_role_society.ibatorgenerated_updateByExample", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public int updateByPrimaryKeySelective(PersonHasRoleSociety record) {
        int rows = getSqlMapClientTemplate().update("person_has_role_society.ibatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    public int updateByPrimaryKey(PersonHasRoleSociety record) {
        int rows = getSqlMapClientTemplate().update("person_has_role_society.ibatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    /**
     * This class was generated by Apache iBATIS ibator.
     * This class corresponds to the database table person_has_role_society
     *
     * @ibatorgenerated
     */
    private static class UpdateByExampleParms extends PersonHasRoleSocietyExample {
        private Object record;

        public UpdateByExampleParms(Object record, PersonHasRoleSocietyExample example) {
            super(example);
            this.record = record;
        }

        public Object getRecord() {
            return record;
        }
    }
}